<#include "/common/layout.html">
<@header>
</@header>
<@body>
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      <small>系统管理 > 字典管理</small>
    </h1>
  </section>
  <!-- Main content -->
  <section class="content">
    <!-- Your Page Content Here -->
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
         <form action="${base}/system/dictionary/list/1" method="post" class="form-inline">
          <div class="box-header">
            <@shiro.hasPermission name="addMenu">
            <div class="input-group">
           	 <a class="btn btn-primary dialog" href="javascript:" data-title="添加字典" data-url="${base}/system/dictionary/toAdd" data-width="800" data-height="550"><i class="fa fa-plus"></i> 添加字典</a>
            </div>
            </@shiro.hasPermission>
            <div class="input-group">
               <input type="text" name="search" value="${search!}" class="form-control" placeholder="Search">
               <div class="input-group-btn">
                 <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                 <a href="${base}/system/dictionary/list/1" class="btn btn-default"><i class="fa fa-refresh"></i></a>
               </div>
            </div>
            <div class="input-group pull-right">
                 <button type="button" class="btn btn-primary btn-flat" onclick="exportTo('字典数据');"><i class="fa fa-file-excel-o"></i> 导出</button>
            </div>
          </div><!-- /.box-header -->
          </form>
          <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
              <tr>
                <th  width="100px"><input value="root" type="checkbox" class="minimal checkbox-toolbar"> 行号</th>
                <th>名称</th>
                <th>编码</th>
                <th>备注</th>
                <th width="200px">操作</th>
              </tr>
              <#list pageData.getRecords() as obj>
              	  <tr>
	                <td>
	                	<label>
	               	 		<input value="${menu.id}" name="roleState" type="checkbox" class="minimal checkbox-item">
	               		 	${((pageData.current-1)*pageData.size +obj_index+1)!}
	                 	</label>
	               	</td>
	                <td>${(obj.categoryNameChs)!}</td>
	                <td>${(obj.categoryNameEn)!}</td>
	                <td>${(obj.remark)!"--"}</td>
	                <td>
	                	<a class="btn btn-primary btn-xs dialog" href="javascript:" data-title="查看字典" data-url="${base}/system/dictionary/view/${(obj.categoryNameEn)!}" data-width="800" data-height="550" data-toggle="tooltip" title="编辑" data-placement="bottom">查看字典</a>
	                	&nbsp;&nbsp;<a class="btn btn-primary btn-xs dialog" href="javascript:" data-title="编辑" data-url="${base}/system/dictionary/toEdit/${(obj.categoryId)!}" data-width="800" data-height="550" data-toggle="tooltip" title="编辑分类" data-placement="bottom">编辑</a>
	                	&nbsp;&nbsp;
	                	<a class="btn btn-danger btn-xs" data-toggle="tooltip" title="删除" data-placement="bottom" data-tiggle="ajax" data-submit-url="${base}/system/dictionary/doDelCategory?categoryId=${(obj.categoryId)!}" data-confirm="您确定要删除该条记录吗?">删除</a>
	                </td>
	              </tr>
              </#list>
            </table>
          </div><!-- /.box-body -->
          <div class="box-footer row">
          <div class="col-md-6">
         	  <#include "/common/paginateBar.html" />
	  		  <@paginate pageData=pageData actionUrl="${base}/system/dictionary/list/" urlParas="?search=${search!}"  />
            </div>
            <div class="col-md-6 pull-left">
            <#include "/common/paginate.html" />
 			<@paginate currentPage=pageData.getCurrent() totalPage=pageData.getPages() actionUrl="${base}/system/dictionary/list/" urlParas="?search=${search!}&pageSize=${pageSize!}"  />
            </div>
          </div>
        </div><!-- /.box -->
      </div>
    </div>
  </section><!-- /.content -->
</div><!-- /.content-wrapper -->
</@body>
<@footer>
</@footer>